#include <iostream>
#include <fstream>
#include "RequestParser.hpp"
#include "../Api Headers/DataTree.hpp"

int	main()
{
  std::ifstream ifs;
  std::string	Request;
  RequestParser	Parser;
  char	tmp_buff[1024];
  zia::api::DataTree	Tree;
  std::string	Body;

  ifs.open("msg.txt");
  while (!ifs.eof())
    {
      ifs.getline(tmp_buff, 1024);
      Request += tmp_buff;
      if (!ifs.eof())
	Request += "\n";
    }
  ifs.close();
  std::cout << "---------- Request ----------\n" << Request << std::endl << "---------- Request Header ----------\n";
  Parser.ParseRequest(Request, Tree, Body);
  std::cout << "---------- Body ----------\n" << Body << std::endl;
  return (0);
}
